package com.sunrise.generico.entidade;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import lombok.Getter;
import lombok.Setter;

import org.hibernate.validator.constraints.NotEmpty;

import com.sunrise.generico.entidade.iface.EntidadeManter;
import com.sunrise.generico.enums.TipoImposto;

@Entity
@Table(name = "situacao_tributaria")
public class SituacaoTributaria implements EntidadeManter {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4370172841147407569L;

	@Id
	@SequenceGenerator(name = "pk_sequence", sequenceName = "situacao_tributaria_id_seq", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "pk_sequence")
	@javax.persistence.Column
	@Getter
	@Setter
	private Long id;

	@NotEmpty(message = "{codigoObrigatorio}")
	@Column(name = "codigo", nullable = false)
	@Getter
	@Setter
	private String codigo;

	@NotEmpty(message = "{situacaoTributariaObrigatorio}")
	@Column(name = "nome", length = 200, nullable = false)
	@Getter
	@Setter
	private String nome;

	@Column(name = "ativo")
	@Getter
	@Setter
	private Boolean ativo;

	@Column(name = "padrao")
	@Getter
	@Setter
	private Boolean padrao;

	@NotNull(message = "{tipoImpostoObrigatorio}")
	@Enumerated(EnumType.STRING)
	@Getter
	@Setter
	private TipoImposto tipoImposto;

}
